#include <stdio.h>
#include <string.h>

#include "record.h"

#define 	MAX_SQL_SENTENCE_LEN 	1024
#define 	MAX_WORD_LEN 			64
#define 	MAX_KEY_WORD_LEN 		64
#define 	KEY_WORD_NUM 			32
#define 	MAX_SYMBOL_NUM 			256

#define 	GET_CHR { \
						ch = sql[pos++]; \
						if (pos > MAX_SQL_SENTENCE_LEN) \
							return -1; \
					}
#define 	SQL_END { \
						get_symbol(); \
						if (sym != semicolon) \
						{ fprintf(stderr, "error ---- should end with semicolon\n"); return -1;} \
						if (sql_len != pos) return -1; \
					}

static char 		sql[MAX_SQL_SENTENCE_LEN];
static char 		word[KEY_WORD_NUM][MAX_KEY_WORD_LEN];
static enum symbol 	wsym[KEY_WORD_NUM];
static enum symbol 	ssym[MAX_SYMBOL_NUM];

static char 		chr;
static int 			

